/**
 * 
 */
package jm.lib.web.jsf;

import javax.faces.convert.Converter;

import jm.lib.web.jsf.converter.BooleanConverter;
import jm.lib.web.jsf.converter.SqlDateConverter;
import jm.lib.web.jsf.converter.SqlTimeConverter;
import jm.lib.web.jsf.converter.SqlTimestampConverter;

/**
 * @author JimingLiu
 *
 */
public class Converters {
	private static final Converter sqlDateConverter = new SqlDateConverter();
	private static final Converter sqlTimeConverter = new SqlTimeConverter();
	private static final Converter sqlTimestampConverter = new SqlTimestampConverter();
	private static final Converter sqlDateNowConverter = new SqlDateConverter(true);
	private static final Converter sqlTimeNowConverter = new SqlTimeConverter(true);
	private static final Converter sqlTimestampNowConverter = new SqlTimestampConverter(true);
	private static final Converter booleanConverter = new BooleanConverter();
	
	public Converter getSqlDateConverter() {
		return sqlDateConverter;
	}
	
	public Converter getSqlTimeConverter() {
		return sqlTimeConverter;
	}
	
	public Converter getSqlTimestampConverter() {
		return sqlTimestampConverter;
	}
	
	/**
	 * The converter use <code>now</code> as default value if input is empty
	 * @return
	 */
	public Converter getSqlDateNowConverter() {
		return sqlDateNowConverter;
	}
	
	/**
	 * The converter use <code>now</code> as default value if input is empty
	 * @return
	 */
	public Converter getSqlTimeNowConverter() {
		return sqlTimeNowConverter;
	}
	
	/**
	 * The converter use <code>now</code> as default value if input is empty
	 * @return
	 */
	public Converter getSqlTimestampNowConverter() {
		return sqlTimestampNowConverter;
	}
	
	
	
	public Converter getBooleanConverter() {
		return booleanConverter;
	}
	
	
}
